﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DomainModel.Entities.Album>>" %>


<table>
    <tr>
        <th></th>       
        <th>Title Picture</th> 
        <th>
            Album Name
        </th>
        <th>
            Release Year
        </th>
        
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.ActionLink("Track Details", "Details","Album", new { id=item.AlbumID },null) %> |
            <%: Html.ActionLink("Edit", "Edit","Album", new { id=item.AlbumID },null) %> |            
            <%: Html.ActionLink("Delete", "Delete","Album", new { id=item.AlbumID },null) %> |
        </td>      
        <td>
         <%= Html.Image(item.LargePicture, new { width="320", height="460" })%>
        </td>
        <td>
            <%: item.AlbumName %>
        </td>
        <td>
            <%: item.AlbumReleaseYear %>
        </td>
        
    </tr>  
<% } %>

</table>
<p>
<%if (ViewData["ArtistID"] != null)
  {%>
    <%: Html.ActionLink("Create New Album", "Create", "Album", new { id = ViewData["ArtistID"] }, null)%>  
 <% } %>
    
</p>
